<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" id="i1" placeholder="请输入1-100之间的数">
<input type="button" id="i2" style="height: 20px;width: 50px;" value="猜一猜">
<div>{{msg}}</div>

<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
    //vue版本
    let message=new Vue({
        el:"div",
        data:{msg:"你猜呀~"}
    })

    $("input:eq(1)").click(function () {
        let num = $("input:eq(0)").val();
        if(num==x){
            message.msg="恭喜您,在第"+times+"次猜对了!";
        }else if(num<x){
            message.msg="猜小了!";
        }else{
            message.msg="猜大了!";
        }
    })
</script>
</body>
</html>